package com.aaa.system.service.impl;

import com.aaa.common.entity.Dept;
import com.aaa.common.vo.Result;
import com.aaa.system.dao.DeptDao;
import com.aaa.system.service.DeptService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: aaa-hospital-parent
 * @description:
 * @author: 闫克起
 * @create: 2024-05-22 14:35
 **/
@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptDao deptDao;
    @Override
    public Result<List<Dept>> findAll() {
        QueryWrapper<Dept> wrapper=new QueryWrapper<>();
        wrapper.eq("del_flag",0);
        List<Dept> depts = deptDao.selectList(wrapper);
        return new Result<List<Dept>>(2000,"查询成功",depts);
    }
}
